package com.hook;

import com.alibaba.fastjson.*;

public class native_hook_helper {
    static {
        try {
            System.loadLibrary("native_hook");
        } catch (Exception e) {
            LogUtils.e("load native_hook failed!", e);
        }
    }
 
    public static String format_args(Object obj) {
        String ret;
        try {
            JSONObject jo = new JSONObject();
            if (obj != null) {
                jo.put(obj.getClass().getName(), obj);
            } else {
                jo.put("null", "null");
            }
            ret = jo.toString();
        } catch (Exception e) {
            JSONObject jo = new JSONObject();
            jo.put(obj.getClass().getName(), e);
            ret = jo.toString();
        }
        return ret;
    }
}


